package com.lcxw.hxzbadmin.service.baseservice;

import java.util.List;
import javax.annotation.Resource;
import net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy;
import org.springframework.stereotype.Component;
import com.lcxw.hxzbadmin.dao.adminmapper.AdminUserMapper;
import com.lcxw.hxzbadmin.entity.pojo.AdminUser;


@Component
public class AdminUserService {

    @Resource
    AdminUserMapper adminUserMapper;

    public AdminUser queryAdminByName(String adminName) {
        return adminUserMapper.queryAdminByName(adminName);
    }

    public int updateAdminByName(AdminUser adminUser) {
        return adminUserMapper.updateAdminByName(adminUser);
    }

    public int insert(AdminUser adminUser) throws Exception {
        return adminUserMapper.insert(adminUser);
    }

    public int deleteByPrimaryKey(Integer id) throws Exception {
        return adminUserMapper.deleteByPrimaryKey(id);
    }

    public List<AdminUser> getAllAdminUser() {
        return adminUserMapper.selectList(null);
    }
}
